<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    请输入你的身高<input type="number" id="height" value="">厘米
    请输入你的体重<input type="number" id="weight" value="">斤
    <button id="btn">检测</button>
    <input type="text" value="" id="res" disabled>
    <script>
        btn.onclick = function () {
            var num1 = height.value
            var num2 = weight.value
            var num3 = num2 - (num1 - 108) * 2
            if (num3 <= 10 && num3 >= -10) {
                res.value = '合适'
            } else {
                res.value = '不合适'
            }
        }
    </script>
</body>

</html>